//
//  LSZPersonalInformationTableViewCell.m
//  JKFuYinProject
//
//  Created by 九酷 on 2018/5/8.
//  Copyright © 2018年 LC. All rights reserved.
//

#import "LSZPersonalInformationTableViewCell.h"

@implementation LSZPersonalInformationTableViewCell

-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        UILabel * labelName = [[UILabel alloc]init];
        labelName.textColor = titleColorLSZ;
        NSString * stringName = @"姓名 *";
        NSMutableAttributedString * strName = [[NSMutableAttributedString alloc]initWithString:stringName];
        //设置：在0-3个单位长度内的内容显示成红色
        [strName addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:NSMakeRange(2,stringName.length-2)];
        labelName.attributedText = strName;

        [self addSubview:labelName];
        if (ScreenWidth == 414){
            labelName.frame = CGRectMake(10,19, ScreenWidth-20,16);
        }else
        if(ScreenWidth ==375){
            labelName.frame = CGRectMake(10,19, ScreenWidth-20,16);
        }else{
            labelName.frame = CGRectMake(10,20, ScreenWidth-20, 14);
        }
        labelName = [LSZSpecialPackaging setLabel_14_5_Size:labelName];
        self.textFieldName = [[InsetsTextField alloc]init];
        [self.textFieldName.layer setCornerRadius:6];
        [self.textFieldName.layer setBorderWidth:1];
        [self.textFieldName.layer setBorderColor:divider.CGColor];
        [self addSubview:self.textFieldName];
        if (ScreenWidth == 414){
            self.textFieldName.font = FONT_15;
            self.textFieldName.frame = CGRectMake(10, CGRectGetMaxY(labelName.frame)+7, ScreenWidth-20, 45);
        }else
        if(ScreenWidth ==375){
            self.textFieldName.font = FONT_(14.5);
            self.textFieldName.frame = CGRectMake(10, CGRectGetMaxY(labelName.frame)+7, ScreenWidth-20, 45);
        }else{
            self.textFieldName.font = FONT_14;
            self.textFieldName.frame = CGRectMake(10, CGRectGetMaxY(labelName.frame)+7, ScreenWidth-20, 40);
        }


        UILabel * labelPhone = [[UILabel alloc]init];
        labelPhone.textColor = titleColorLSZ;
        NSString * string = @"手机号码 *";
         NSMutableAttributedString * str = [[NSMutableAttributedString alloc]initWithString:string];
        //设置：在0-3个单位长度内的内容显示成红色
        [str addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:NSMakeRange(4,string.length-4)];
        labelPhone.attributedText = str;
        [self addSubview:labelPhone];
        if (ScreenWidth == 414){
            labelPhone.frame = CGRectMake(10,19+CGRectGetMaxY(self.textFieldName.frame), ScreenWidth-20,16);
        }else
        if(ScreenWidth ==375){
            labelPhone.frame = CGRectMake(10,19+CGRectGetMaxY(self.textFieldName.frame), ScreenWidth-20,16);
        }else{
            labelPhone.frame = CGRectMake(10,20+CGRectGetMaxY(self.textFieldName.frame), ScreenWidth-20, 14);
        }
        labelPhone = [LSZSpecialPackaging setLabel_14_5_Size:labelPhone];
        self.textFieldPhone = [[InsetsTextField alloc]init];
        [self.textFieldPhone.layer setCornerRadius:6];
        [self.textFieldPhone.layer setBorderWidth:1];
        [self.textFieldPhone.layer setBorderColor:divider.CGColor];
        [self addSubview:self.textFieldPhone];
        if (ScreenWidth == 414){
            self.textFieldPhone.font = FONT_15;
            self.textFieldPhone.frame = CGRectMake(10, CGRectGetMaxY(labelPhone.frame)+7, ScreenWidth-20, 45);
        }else
        if(ScreenWidth ==375){
            self.textFieldPhone.font = FONT_(14.5);
            self.textFieldPhone.frame = CGRectMake(10, CGRectGetMaxY(labelPhone.frame)+7, ScreenWidth-20, 45);
        }else{
            self.textFieldPhone.font = FONT_14;
            self.textFieldPhone.frame = CGRectMake(10, CGRectGetMaxY(labelPhone.frame)+7, ScreenWidth-20, 40);
        }
    }
    return self;
}

@end
